package com.itheima;

import com.itheima.manage_system.domain.Student;
import java.util.ArrayList;
import java.util.Scanner;

public class Entry {
    public static void main(String[] args) {
        System.out.println("---------------欢迎进入学生管理系统---------------");
        Scanner sc = new Scanner(System.in);
        SutdentTool sutdentTool = new SutdentTool();
        ArrayList<Student> students = new ArrayList<>();

        while (true) {
            System.out.print("1.添加学生\t\t");
            System.out.print("2.删除学生\t\t");
            System.out.print("3.修改学生\t\t");
            System.out.print("4.查询学生\t\t");
            System.out.println("5.退出系统\t\t");
            System.out.println("请选择:");
            String select = sc.next();
            switch (select) {
                case "1":
                    sutdentTool.add(students);
                    break;
                case "2":
                    sutdentTool.remove(students);
                    break;
                case "3":
                    sutdentTool.update(students);
                    break;
                case "4":
                    sutdentTool.queryAll(students);
                    break;
                case "5":
                    System.out.println("谢谢使用,再见");
                    return;
                default:
                    System.out.println("输入有误");
                    break;
            }
        }
    }

}
